---@class AttackAction :AbstractLeaf
local AttackAction = ClientFight.CreateClass("AttackAction",ClientFight.AbstractLeaf,ClientFight.IAction)
function AttackAction:ctor()
end
---@return EStatus
function AttackAction:update()
    if self.fighter.modelId == 1 then
        local a = 0;
    end
    if(self.fighter.moveTarget ~= nil or self.fighter.moveDirection ~= 0 or self.fighter.movePosition ~= nil) then
        self.fighter.moveTarget = nil
        self.fighter.moveDirection = 0
        self.fighter.movePosition = nil
        ReportManager.setMoveEndToJsonString(self.fight,self.fighter,self.fighter.moveAction)
        self.fighter.moveAction = nil
        SkillRoleMgr.savePathFile("["..self.fight.frame.."][STOP]Fighter "..self.fighter.fighterId.." 停止移动"..getJsonStr(self.fighter.position))
    end
   SkillRoleMgr.savePathFile("["..self.fight.frame.."][攻击]"..self.fighter:print().."准备对"..self.fighter.prepareTarget:print()
    .."攻击，使用技能"..self.fighter.prepareSkill.skillId)
    ---@type FightSkill
    local skill = self.fighter.prepareSkill
    ---@type BuffSetSkillRuleSelector
    local ruleSelectorByBuff = skill.ruleSelectorByBuff
    if ruleSelectorByBuff ~= nil then
        --如果有强行修改这次技能 规则的 buf效果, 那么设定给技能, 在技能使用成功前,清除该缓存
        self.fighter:removeSkillTargetRuleSelectorByBuff(ruleSelectorByBuff.buffUUID)
    end
    ClientFight.SkillClientManager.useSkill(self.fight,self.fighter,self.fighter.prepareTarget,skill)
    self.fighter.lastAttackFighter = self.fighter.prepareTarget
    if(self.fighter.prepareSkill.skillBean.f_SkillType == 1) then
        self.fighter.lastNormalAttackFighter = self.fighter.prepareTarget
    end
    self.fighter.prepareSkill = nil
    self.fighter.prepareTarget = nil
    table.clear(self.fighter.skipSkill)
    return EStatus.SUCCESS
end